package com.hrg.rds.biz.waybill.controller;

import com.hrg.rds.biz.waybill.domain.template.WaybillTemplateDto;
import com.hrg.rds.biz.waybill.domain.template.WaybillTemplateVo;
import com.hrg.rds.biz.waybill.service.WaybillTemplateService;
import com.hrg.sys.framework.web.controller.BaseController;
import com.hrg.sys.framework.web.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/open/waybillTemplate")
public class WaybillTemplateController extends BaseController {
	@Autowired
	private WaybillTemplateService waybillTemplateService;

	@GetMapping(value = "/list", produces = MediaType.APPLICATION_JSON_VALUE)
	public TableDataInfo list(WaybillTemplateDto waybillTemplateDto) {
		startPage();// pageNum, pageSize, orderByColumn, isAsc 分页参数写在查询串
		List<WaybillTemplateVo> list = waybillTemplateService.selectList(waybillTemplateDto);
		return getDataTable(list);
	}

	public void saveTemplate() {
		// 每个 cmd之间的 order 步长设置为 5000，方便动态往中间插入
	}
}
